<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>编辑教师</title>
<style type="text/css">
	form p label {
		display: inline-block;
		width: 80px;
		text-align: right;
	}
	form p input {
		padding: 5px;
		width: 200px;
	}
</style>
<script type="text/javascript">
function aaa(form) {
	var name=form.name.value;
	var username=form.username.value;
	var password=form.password.value;
	if(name.length==0){
		alert("教师名字不能为空");
		return false;
	}
	if(username.length==0){
		alert("用户名不能为空");
		return false;
	}
	if(password.length==0){
		alert("密码不能为空")
		return false;
	}
	return true;
}

</script>
</head>
<body border="1" background="images/1.jpg">
<h2>老师编辑</h2>
	<div>
		<form action="tea?method=save" method="post" onsubmit="return aaa(this)">
			<input type="hidden" name="id" value="${model.id}">
			<p><label>教师</label><input type="text" name="name" value="${model.name}"></p>
			<p><label>用户名</label><input type="text" name="password" value="${model.password}"></p>
			<p><label>密码</label><input type="text" name="username" value="${model.username}"></p>
			<p><button type="submit">提交</button> </p>
		</form>
	<a href=tea>返回</a>
	</div>
</body>
</html>